package com.charges.model.repository;

import com.charges.model.entity.BenefitDO;
import java.util.List;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

/**
 * 权益数据访问接口
 * @author admin
 */
@Repository
public interface BenefitRepository extends JpaRepository<BenefitDO, Integer> {

    @EntityGraph(value = "benefit.full", type = EntityGraph.EntityGraphType.LOAD)
    List<BenefitDO> findByStatusAndCode(BenefitDO.Status status, String code);
}